
//////// player.cpp //////////////////////////////////////////////////////
//    Author:        Richard (richard.lindholm85@gmail.com)             //
//    Project:    some game project                                     //
//    Version:    0.1                                                   //
//    Purpose:    Player class,                                         //
//                Handles the player and its functions                  //
//    Comments:    Maybe I should use K.I.S.S. (Keep It Simple Stupid)  //
//                more                                                  //
//////////////////////////////////////////////////////////////////////////

#include "player.h"

;
cPlayer::cPlayer()
{
    m_fHP = 1000;
    m_uiPlayerState = PSTATE_IDLE;
}

/*cPlayer::cPlayer(int startHP)
{
    m_fHP = (float)startHP;
    m_uiPlayerState = PSTATE_IDLE;
    m_pCurrentPlayer.first = NULL;
    m_pCurrentPlayer.second = NULL;
}*/

cPlayer::~cPlayer()
{
}

bool cPlayer::removeHP(float damageTaken)
{
    if (damageTaken > m_fHP)
    {
        m_fHP = 0.0f;
        return false;
    }

    m_fHP -= damageTaken;
    return true;
}

unsigned int cPlayer::getPlayerState()
{
    if (this == NULL)
        return PSTATE_ERROR;
    return this->m_uiPlayerState;
}

void cPlayer::setPlayerState(unsigned int pState)
{
    this->m_uiPlayerState = pState;
}
